package com.sk.z.khk.calcfee;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CalcFee {
	private Repository repository;
	private Date date;

	public CalcFee(Repository repository) {
		this.repository = repository;
		date = new Date();
	}

	public Boolean existBank(String bankName) {
		boolean bool = repository.existBank(bankName);
		return bool;
	}

	public Integer getCurrentMinute() {
		SimpleDateFormat sdf = new SimpleDateFormat("mm");
		return Integer.parseInt(sdf.format(date).toString());
	}

	public Integer getCurrentHour() {
		SimpleDateFormat sdf = new SimpleDateFormat("HH");
		return Integer.parseInt(sdf.format(date).toString());
	}

}
